# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=dtkcommon
pkgver=5.6.8
pkgrel=1
pkgdesc='DTK common files'
arch=('any')
url="https://github.com/linuxdeepin/dtkcommon"
license=('LGPL3')
depends=('dconf')
makedepends=('cmake' 'ninja')
source=("https://github.com/linuxdeepin/dtkcommon/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('ef85e20136b1dafaf32c6d14167ed422d4638de0f1d99bc408fee103d23b9c4b2b20cb801ec44f0a79d9e3e1da4b99a076e24757827bc4f4dfeb6404b4c64f5f')

build() {
  cd dtkcommon-$pkgver
  cmake . -GNinja \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DMKSPECS_INSTALL_DIR=/usr/lib/qt/mkspecs/ \
    -DCMAKE_INSTALL_PREFIX=/usr  \
    -DDVERSION=$pkgver
  ninja
}

package() {
  cd dtkcommon-$pkgver
  DESTDIR="$pkgdir" ninja install
}
